package me.guizhi.work.service;

import me.guizhi.work.dao.UserDao;
import me.guizhi.work.dao.UserDaoImpl;
import me.guizhi.work.domain.User;

import java.sql.SQLException;

public class UserImpl implements UserService {
    @Override
    public User login(String username, String password) throws SQLException {
        UserDao userDao = new UserDaoImpl();
        User user = userDao.login(username,password);
        return user;
    }

    @Override
    public void addUser(User user) throws SQLException {
        UserDao userdao = new UserDaoImpl();
        userdao.addUser(user);
    }
}
